package com.qqla.controller;


import com.qqla.dto.LoginDto;
import com.qqla.enumeration.AppHttpCodeEnum;
import com.qqla.result.ResponseResult;
import com.qqla.service.LoginService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/login")
@RequiredArgsConstructor
public class LoginController {

    private final LoginService loginService;

    /*
    * 登录接口
    * */
    @PostMapping
    public ResponseResult login(@RequestBody LoginDto dto) {

        // 处理登录逻辑
        ResponseResult res = loginService.login(dto);

        return res;
    }
}
